package Test;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        System.out.println("n1=");
        int n1 = sc.nextInt();
        int[] arr1 = new int[n1];
        System.out.println("arr1=");
        for (int i = 0; i < arr1.length; i++) {
            arr1[i] = sc.nextInt();
        }

        System.out.println("n2=");
        int n2 = sc.nextInt();
        int[] arr2 = new int[n2];
        System.out.println("arr2=");
        for (int i = 0; i < arr2.length; i++) {
            arr2[i] = sc.nextInt();;
        }

        boolean ret = equals(arr1, arr2);
        if(ret)
        {
            System.out.println("相等");
        }
        else
        {
            System.out.println("不相等");
        }

        test();
        test(1);
        test(1,2);
    }

    //函数重载
    public static void test(){
        System.out.println("public static void test()");
    }
    public static void test(int a){
        System.out.println("public static void test(int a)");
    }
    public static int test(int a, int b){
        System.out.println("public static int test(int a, int b)");
        return a+b;
    }


    //判断数组是否相等
    public static boolean equals(int[] arr1, int[] arr2){
        if(arr1.length!=arr2.length)
        {
            return false;
        }

        for (int i = 0; i < arr1.length; i++)
        {
            if(arr1[i]!=arr2[i])
            {
                return false;
            }
        }

        return true;
    }
}
